package com.zzt.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

@NoArgsConstructor
@ToString
//public class Memberinfo implements UserDetails {
public class Memberinfo {
    private Integer mno;

    public Memberinfo(Integer mno, String nickname, String tel, String email, String photo, Integer status, String address) {
        this.mno = mno;
        this.nickname = nickname;
        this.tel = tel;
        this.email = email;
        this.photo = photo;
        this.status = status;
        this.address = address;
    }

    private String nickname;

    private String pwd;

    private String tel;

    private String email;

    private String photo;

    private Integer status;

    private String address;

    public Integer getMno() {
        return mno;
    }

    public void setMno(Integer mno) {
        this.mno = mno;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Memberinfo(String nickname, String pwd) {
        this.nickname = nickname;
        this.pwd = pwd;
    }

    public Memberinfo(Integer mno, String nickname, String pwd, String tel, String email, String photo, Integer status, String address) {
        this.mno = mno;
        this.nickname = nickname;
        this.pwd = pwd;
        this.tel = tel;
        this.email = email;
        this.photo = photo;
        this.status = status;
        this.address = address;
    }

    public Memberinfo(String nickname, String pwd, String photo) {
        this.nickname = nickname;
        this.pwd = pwd;
        this.photo = photo;
    }

   /* @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public String getPassword() {
        return getPwd();
    }

    @Override
    public String getUsername() {
        return getNickname();
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }*/
}